/*
 * Init.h
 *
 *  Created on: 2011-7-6
 *      Author: gexiao
 */
/*
 * VM initialization and shutdown.
 */
#ifndef INIT_H_
#define INIT_H_
#include <stdbool.h>//tmp
#include "../libnativehelper/include/nativehelper/jni.h"//tmp
/*
 * Standard VM initialization,usually invoked through JNI.
 */
int dvmStartup(int argc, const char* const argv[], bool ignoreUnrecognized,
		JNIEnv* pEnv);
void dvmShutdown(void);
bool dvmInitAfterZygote(void);

/*
 * Replacement for fprintf() when we want to send a message to the console.
 * This defaults to fprintf(), but will use the JNI fprintf callback if
 * one was provided.
 */
int dvmFprintf(FILE* fp, const char* format, ...)
#if defined(__GNUC__)
__attribute__ ((format(printf, 2, 3)))
#endif
;
#endif /* INIT_H_ */
